/*
 * @Desc:
 * @author cheegon
 * @date 2024/7/24  上午9:24
**/
import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/userModule.js'
import getters from './getters'

Vue.use(Vuex)

const store= new Vuex.Store({
    modules: {
        user
    },
    state: {
        count: 0
    },
    getters: {
        ...getters,
        count(state) {
            return state.count
        }
    },
    mutations: {
        addCount(state, num) {
            state.count += num
        }
    },
    actions: {}
})
export default store
